import instance from '@/utils/request.js'



export const getPlantList = (params) => {
  return instance({
    url: '/plant/list',
    method: 'get',
    params,
  })
};


export const addPlant = (data) => {
  return instance({
    url: '/plant',
    method: 'post',
    data,
  })
};

export const deletePlant = (id) => {
  return instance({
    url: `/plant/${id}`,
    method: 'delete',
  })
};


export const getPlantDetail = (id) => {
  return instance({
    url: `/plant/${id}`,
    method: 'get',
  })
}
